﻿<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<script type="text/javascript" src="<?php echo $this->baseUrl?>/script/jquery.js"></script>
<script type="text/javascript">
var request = new XMLHttpRequest();
function checkName(name)
{
    request.abort();
    request.open("GET","/eCRM/services/checkname.php?name="+name,true);
    request.onreadystatechange=function(){
        if(request.readyState == 4)
        {
            document.getElementById('message').innerHTML
                = request.responseText;
        }
    }
    request.send(null);
}
</script>


<style type="text/css">
table {
	font-size:12px;
	font-family:Calibri, tahoma, arial, sans-serif;
	white-space:nowrap;
	border-collapse:collapse;
	background-color:#FFFFFF;
}
td {
	padding:2px;
}
td input {
    border-style: none;
}
tr {
	height:20px;
	border:.5pt solid #F79646;
	background-color:#FFFFFF;
}
tr :hover{
	height:20px;
	border:.5pt solid #F79646;
	background-color:#33FFFF;
}
.offColor {
	background-color:#FDE9D9;
}
.header { 
	text-align:center;
	background-color:#F79646;
	color:white;
	font-weight:bold;
}
.header a{
	color:white;
}
</style>


<head>

</head>
<body>
<table id="location_tab" class="edit_tab">
<tr>
<td class="header">地点信息</td>
<td></td>
</tr>
<?php foreach($this->locations as $location) : ?>
<tr>
    <td>
        <input id = "<?php echo $location->id?>" value="<?php echo $location->name?>" class="readonly">
        </input>
    </td>
    <td>
    <a href="#">选择</a> 
    </td>
</tr>
<?php endforeach; ?>
</table>

<input id='name' name='name' type="text" onkeyup="checkName(this.value)">
</input>
<div id="message"></div>

</body>